package com.soft2018;

//地图类
public class Map {
    //TODO:字段定义
    //坐标、地图名、描述
    private int x;
    private int y;
    private String name;
    private String info;
    //TODO:取值器、赋值器

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
    //TODO:构造器
    public Map(){}
    public Map(int x,int y,String name,String info)
    {
        this.x=x;
        this.y=y;
        this.name=name;
        this.info=info;
    }
    //TODO:功能方法

    //打印当前地图信息
    public void print(){
        System.out.println("当前位置："+this.name);
        System.out.println("坐标：x="+this.x+"; y="+this.y);
        System.out.println(this.info);
    }
}
